package 多线程.插队;

public class Test {
    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(new Example(),"线程A");
        thread.start();
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"---"+i);
            if (i==5){
                thread.join();
            }
        }
    }
}
